<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>LiquidFun: b2ParticleColor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">LiquidFun
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-static-attribs">Static Protected Attributes</a> &#124;
<a href="classb2_particle_color-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">b2ParticleColor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Small color object for each particle.  
 <a href="classb2_particle_color.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="b2_particle_8h_source.html">b2Particle.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad8d2e94a330bdacc7fcf88e4faa5b2a6"><td class="memItemLeft" align="right" valign="top">b2Inline&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#ad8d2e94a330bdacc7fcf88e4faa5b2a6">b2ParticleColor</a> (uint8 r, uint8 g, uint8 b, uint8 a)</td></tr>
<tr class="separator:ad8d2e94a330bdacc7fcf88e4faa5b2a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a393030bdcfaf454de488a1cdc1304859"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#a393030bdcfaf454de488a1cdc1304859">b2ParticleColor</a> (const <a class="el" href="structb2_color.html">b2Color</a> &amp;color)</td></tr>
<tr class="separator:a393030bdcfaf454de488a1cdc1304859"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a33a8b8437747ad3b2e5955ae69bd9b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#a4a33a8b8437747ad3b2e5955ae69bd9b">IsZero</a> () const </td></tr>
<tr class="separator:a4a33a8b8437747ad3b2e5955ae69bd9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e844b191956c1f6fa3279b4a6cb1b71"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structb2_color.html">b2Color</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#a7e844b191956c1f6fa3279b4a6cb1b71">GetColor</a> () const </td></tr>
<tr class="separator:a7e844b191956c1f6fa3279b4a6cb1b71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6adfe92cc278aea558e3e70076274fc1"><td class="memItemLeft" align="right" valign="top">b2Inline void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#a6adfe92cc278aea558e3e70076274fc1">Set</a> (uint8 r_, uint8 g_, uint8 b_, uint8 a_)</td></tr>
<tr class="separator:a6adfe92cc278aea558e3e70076274fc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab37db15b2c0fac2718e279fb9416d98f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#ab37db15b2c0fac2718e279fb9416d98f">Set</a> (const <a class="el" href="structb2_color.html">b2Color</a> &amp;color)</td></tr>
<tr class="separator:ab37db15b2c0fac2718e279fb9416d98f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4895249cb23bb11a30517ca00aa009fc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4895249cb23bb11a30517ca00aa009fc"></a>
<a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#a4895249cb23bb11a30517ca00aa009fc">operator=</a> (const <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;color)</td></tr>
<tr class="memdesc:a4895249cb23bb11a30517ca00aa009fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assign a <a class="el" href="classb2_particle_color.html" title="Small color object for each particle. ">b2ParticleColor</a> to this instance. <br/></td></tr>
<tr class="separator:a4895249cb23bb11a30517ca00aa009fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1875044d1ac194bf5733053b968f442"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#ab1875044d1ac194bf5733053b968f442">operator*=</a> (float32 s)</td></tr>
<tr class="separator:ab1875044d1ac194bf5733053b968f442"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad74c0763f4d48d018d60388bf6ddbf89"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad74c0763f4d48d018d60388bf6ddbf89"></a>
<a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#ad74c0763f4d48d018d60388bf6ddbf89">operator*=</a> (uint8 s)</td></tr>
<tr class="memdesc:ad74c0763f4d48d018d60388bf6ddbf89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scales r, g, b, a members by s where s is a value between 0 and 255. <br/></td></tr>
<tr class="separator:ad74c0763f4d48d018d60388bf6ddbf89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e6f84ca10776e9baa59d5f60d0d8ba4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3e6f84ca10776e9baa59d5f60d0d8ba4"></a>
<a class="el" href="classb2_particle_color.html">b2ParticleColor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#a3e6f84ca10776e9baa59d5f60d0d8ba4">operator*</a> (float32 s) const </td></tr>
<tr class="memdesc:a3e6f84ca10776e9baa59d5f60d0d8ba4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scales r, g, b, a members by s returning the modified <a class="el" href="classb2_particle_color.html" title="Small color object for each particle. ">b2ParticleColor</a>. <br/></td></tr>
<tr class="separator:a3e6f84ca10776e9baa59d5f60d0d8ba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6683d23159c5097a4b6b2685ca8d628"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad6683d23159c5097a4b6b2685ca8d628"></a>
<a class="el" href="classb2_particle_color.html">b2ParticleColor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#ad6683d23159c5097a4b6b2685ca8d628">operator*</a> (uint8 s) const </td></tr>
<tr class="memdesc:ad6683d23159c5097a4b6b2685ca8d628"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scales r, g, b, a members by s returning the modified <a class="el" href="classb2_particle_color.html" title="Small color object for each particle. ">b2ParticleColor</a>. <br/></td></tr>
<tr class="separator:ad6683d23159c5097a4b6b2685ca8d628"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fdb6cb76eb8bcdbadd12d5c1ba637a4"><td class="memItemLeft" align="right" valign="top">b2Inline <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#a3fdb6cb76eb8bcdbadd12d5c1ba637a4">operator+=</a> (const <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;color)</td></tr>
<tr class="separator:a3fdb6cb76eb8bcdbadd12d5c1ba637a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e90091e382b6cdcff1819a59515fea7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classb2_particle_color.html">b2ParticleColor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#a9e90091e382b6cdcff1819a59515fea7">operator+</a> (const <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;color) const </td></tr>
<tr class="separator:a9e90091e382b6cdcff1819a59515fea7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adfeeedfb5ad15a51b2354dd1ef64dc4f"><td class="memItemLeft" align="right" valign="top">b2Inline <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#adfeeedfb5ad15a51b2354dd1ef64dc4f">operator-=</a> (const <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;color)</td></tr>
<tr class="separator:adfeeedfb5ad15a51b2354dd1ef64dc4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95ab125fa45ca7cf24c231b2ccb2c98e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classb2_particle_color.html">b2ParticleColor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#a95ab125fa45ca7cf24c231b2ccb2c98e">operator-</a> (const <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;color) const </td></tr>
<tr class="separator:a95ab125fa45ca7cf24c231b2ccb2c98e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab84c393584da555a7efe9a0dbd0daddf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab84c393584da555a7efe9a0dbd0daddf"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#ab84c393584da555a7efe9a0dbd0daddf">operator==</a> (const <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;color) const </td></tr>
<tr class="memdesc:ab84c393584da555a7efe9a0dbd0daddf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare this color with the specified color. <br/></td></tr>
<tr class="separator:ab84c393584da555a7efe9a0dbd0daddf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae61287a0be96027fae9a77a4354e4bbf"><td class="memItemLeft" align="right" valign="top">b2Inline void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#ae61287a0be96027fae9a77a4354e4bbf">Mix</a> (<a class="el" href="classb2_particle_color.html">b2ParticleColor</a> *const mixColor, const int32 strength)</td></tr>
<tr class="separator:ae61287a0be96027fae9a77a4354e4bbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a31eb4241de8148393c4a69d81ed1d78d"><td class="memItemLeft" align="right" valign="top">static b2Inline void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#a31eb4241de8148393c4a69d81ed1d78d">MixColors</a> (<a class="el" href="classb2_particle_color.html">b2ParticleColor</a> *const colorA, <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> *const colorB, const int32 strength)</td></tr>
<tr class="separator:a31eb4241de8148393c4a69d81ed1d78d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a09322a9f7ab6d8048345c2e7450800f0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09322a9f7ab6d8048345c2e7450800f0"></a>
uint8&#160;</td><td class="memItemRight" valign="bottom"><b>r</b></td></tr>
<tr class="separator:a09322a9f7ab6d8048345c2e7450800f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72f309aabc83c5936e3080f4daf8a30c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a72f309aabc83c5936e3080f4daf8a30c"></a>
uint8&#160;</td><td class="memItemRight" valign="bottom"><b>g</b></td></tr>
<tr class="separator:a72f309aabc83c5936e3080f4daf8a30c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdaee559c5e190d348fe3886baee5319"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afdaee559c5e190d348fe3886baee5319"></a>
uint8&#160;</td><td class="memItemRight" valign="bottom"><b>b</b></td></tr>
<tr class="separator:afdaee559c5e190d348fe3886baee5319"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9285535953e670626686be1a0810404d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9285535953e670626686be1a0810404d"></a>
uint8&#160;</td><td class="memItemRight" valign="bottom"><b>a</b></td></tr>
<tr class="separator:a9285535953e670626686be1a0810404d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-attribs"></a>
Static Protected Attributes</h2></td></tr>
<tr class="memitem:aea894d9120f90e180f7b8fba59d609df"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea894d9120f90e180f7b8fba59d609df"></a>
static const float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#aea894d9120f90e180f7b8fba59d609df">k_maxValue</a> = (float)B2PARTICLECOLOR_MAX_VALUE</td></tr>
<tr class="memdesc:aea894d9120f90e180f7b8fba59d609df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum value of a <a class="el" href="classb2_particle_color.html" title="Small color object for each particle. ">b2ParticleColor</a> component. <br/></td></tr>
<tr class="separator:aea894d9120f90e180f7b8fba59d609df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4b1826a9039a2b560bbeeb42a7fe291"><td class="memItemLeft" align="right" valign="top">static const float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#ac4b1826a9039a2b560bbeeb42a7fe291">k_inverseMaxValue</a></td></tr>
<tr class="memdesc:ac4b1826a9039a2b560bbeeb42a7fe291"><td class="mdescLeft">&#160;</td><td class="mdescRight">1.0 / k_maxValue.  <a href="#ac4b1826a9039a2b560bbeeb42a7fe291">More...</a><br/></td></tr>
<tr class="separator:ac4b1826a9039a2b560bbeeb42a7fe291"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8c2081384421b5ac33c989996745566"><td class="memItemLeft" align="right" valign="top">static const uint8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_particle_color.html#ac8c2081384421b5ac33c989996745566">k_bitsPerComponent</a></td></tr>
<tr class="memdesc:ac8c2081384421b5ac33c989996745566"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of bits used to store each <a class="el" href="classb2_particle_color.html" title="Small color object for each particle. ">b2ParticleColor</a> component.  <a href="#ac8c2081384421b5ac33c989996745566">More...</a><br/></td></tr>
<tr class="separator:ac8c2081384421b5ac33c989996745566"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Small color object for each particle. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad8d2e94a330bdacc7fcf88e4faa5b2a6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">b2Inline b2ParticleColor::b2ParticleColor </td>
          <td>(</td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor with four elements: r (red), g (green), b (blue), and a (opacity). Each element can be specified 0 to 255. </p>

</div>
</div>
<a class="anchor" id="a393030bdcfaf454de488a1cdc1304859"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">b2ParticleColor::b2ParticleColor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structb2_color.html">b2Color</a> &amp;&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor that initializes the above four elements with the value of the <a class="el" href="structb2_color.html" title="Color for debug drawing. Each value has the range [0,1]. ">b2Color</a> object. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a7e844b191956c1f6fa3279b4a6cb1b71"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structb2_color.html">b2Color</a> b2ParticleColor::GetColor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Used internally to convert the value of <a class="el" href="structb2_color.html" title="Color for debug drawing. Each value has the range [0,1]. ">b2Color</a>. </p>

</div>
</div>
<a class="anchor" id="a4a33a8b8437747ad3b2e5955ae69bd9b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool b2ParticleColor::IsZero </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>True when all four color elements equal 0. When true, a particle color buffer isn't allocated by CreateParticle(). </p>

</div>
</div>
<a class="anchor" id="ae61287a0be96027fae9a77a4354e4bbf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">b2Inline void b2ParticleColor::Mix </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classb2_particle_color.html">b2ParticleColor</a> *const&#160;</td>
          <td class="paramname"><em>mixColor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32&#160;</td>
          <td class="paramname"><em>strength</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Mix mixColor with this color using strength to control how much of mixColor is mixed with this color and vice versa. The range of strength is 0..128 where 0 results in no color mixing and 128 results in an equal mix of both colors. strength 0..128 is analogous to an alpha channel value between 0.0f..0.5f. </p>

</div>
</div>
<a class="anchor" id="a31eb4241de8148393c4a69d81ed1d78d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static b2Inline void b2ParticleColor::MixColors </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classb2_particle_color.html">b2ParticleColor</a> *const&#160;</td>
          <td class="paramname"><em>colorA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classb2_particle_color.html">b2ParticleColor</a> *const&#160;</td>
          <td class="paramname"><em>colorB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int32&#160;</td>
          <td class="paramname"><em>strength</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Mix colorA with colorB using strength to control how much of colorA is mixed with colorB and vice versa. The range of strength is 0..128 where 0 results in no color mixing and 128 results in an equal mix of both colors. strength 0..128 is analogous to an alpha channel value between 0.0f..0.5f. </p>

</div>
</div>
<a class="anchor" id="ab1875044d1ac194bf5733053b968f442"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classb2_particle_color.html">b2ParticleColor</a>&amp; b2ParticleColor::operator*= </td>
          <td>(</td>
          <td class="paramtype">float32&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Multiplies r, g, b, a members by s where s is a value between 0.0 and 1.0. </p>

</div>
</div>
<a class="anchor" id="a9e90091e382b6cdcff1819a59515fea7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classb2_particle_color.html">b2ParticleColor</a> b2ParticleColor::operator+ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Add two colors. This is a non-saturating addition so values overflows will wrap. </p>

</div>
</div>
<a class="anchor" id="a3fdb6cb76eb8bcdbadd12d5c1ba637a4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">b2Inline <a class="el" href="classb2_particle_color.html">b2ParticleColor</a>&amp; b2ParticleColor::operator+= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Add two colors. This is a non-saturating addition so values overflows will wrap. </p>

</div>
</div>
<a class="anchor" id="a95ab125fa45ca7cf24c231b2ccb2c98e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classb2_particle_color.html">b2ParticleColor</a> b2ParticleColor::operator- </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Subtract a color from this color returning the result. This is a subtraction without saturation so underflows will wrap. </p>

</div>
</div>
<a class="anchor" id="adfeeedfb5ad15a51b2354dd1ef64dc4f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">b2Inline <a class="el" href="classb2_particle_color.html">b2ParticleColor</a>&amp; b2ParticleColor::operator-= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classb2_particle_color.html">b2ParticleColor</a> &amp;&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Subtract a color from this color. This is a subtraction without saturation so underflows will wrap. </p>

</div>
</div>
<a class="anchor" id="a6adfe92cc278aea558e3e70076274fc1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">b2Inline void b2ParticleColor::Set </td>
          <td>(</td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>r_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>g_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>b_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>a_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets color for current object using the four elements described above. </p>

</div>
</div>
<a class="anchor" id="ab37db15b2c0fac2718e279fb9416d98f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void b2ParticleColor::Set </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structb2_color.html">b2Color</a> &amp;&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initializes the object with the value of the <a class="el" href="structb2_color.html" title="Color for debug drawing. Each value has the range [0,1]. ">b2Color</a>. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ac8c2081384421b5ac33c989996745566"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const uint8 b2ParticleColor::k_bitsPerComponent</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">=</div>
<div class="line">    B2PARTICLECOLOR_BITS_PER_COMPONENT</div>
</div><!-- fragment -->
<p>Number of bits used to store each <a class="el" href="classb2_particle_color.html" title="Small color object for each particle. ">b2ParticleColor</a> component. </p>

</div>
</div>
<a class="anchor" id="ac4b1826a9039a2b560bbeeb42a7fe291"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const float32 b2ParticleColor::k_inverseMaxValue</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">=</div>
<div class="line">    1.0f / (float)B2PARTICLECOLOR_MAX_VALUE</div>
</div><!-- fragment -->
<p>1.0 / k_maxValue. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="b2_particle_8h_source.html">b2Particle.h</a></li>
<li>b2Particle.cpp</li>
</ul>
</div><!-- contents -->
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46159502-1', 'auto');
ga('create', 'UA-49880327-7', 'auto', {'name': 'liquidFunTracker'});
ga('send', 'pageview');
ga('liquidFunTracker.send', 'pageview');
</script>
</body>
</html>
